Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecator improvements #2997

Merged
merged 2 commits into from
Sep 12, 2024
Merged

Deprecator improvements #2997

merged 2 commits into from
Sep 12, 2024

Conversation

stefannibrasil
Copy link
Contributor

In preparation for removing deprecations for certain generators, this commit documents the Deprecator and how to test deprecated generators. It also adds a unit test using newly added matchers based on Rails deprecation matchers. This new test is independent from any "real" deprecated generator that can be removed at any time.

With this change, we can remove generators in a follow up PR while having the Deprecator covered and documented.

In preparation for removing deprecations for certain generators,
this commit documents the Deprecator and how to test deprecated
generators. It also adds a unit test using newly added matchers
based on Rails deprecation matchers.

With this change, we can remove generators in a follow up PR
while having the Deprecator covered and documented.
@@ -1,17 +1,70 @@
# frozen_string_literal: true

# Based on Rails ActiveSupport Deprecator
# https://github.com/rails/rails/blob/6f0d1ad14b92b9f5906e44740fce8b4f1c7075dc/activesupport/lib/active_support/deprecation/constant_accessor.rb
# https://github.com/rails/rails/blob/main/activesupport/lib/active_support/deprecation/constant_accessor.rb
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes here are mostly documentation and identation.

@@ -0,0 +1,41 @@
# frozen_string_literal: true
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved this file from test/faker/ to test/faker/support.

@@ -6,7 +6,7 @@ source 'https://rubygems.org'
gemspec

gem 'benchmark'
gem 'minitest', '5.25.0'
gem 'minitest', '5.25.1'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ruby head was not happy with the old version. This new version works for all Ruby versions in CI.

@stefannibrasil stefannibrasil merged commit b09aa0d into main Sep 12, 2024
8 checks passed
@stefannibrasil stefannibrasil deleted the sb-deprecator-improvements branch September 12, 2024 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant